home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 6 / MacMania 6.toast / / Tools&Utilities / TouchMe 1.2□ / touchMe 1.2 Folder / touchMe source codes / CW11 PP source / source / Common Lib / ErrorMessage.r < prev    next >
Encoding:
Text File  |  1997-04-25  |  4.0 KB  |  147 lines  |  [TEXT/CWIE]

  1. // ==================================================
  2. //    ErrorMessage.r
  3. //    Copyright (C) 1996-1997 Mizutori Tetsuya
  4. //    July 4 ,1996; February 3, 1997.
  5. // ==================================================
  6. //    All documents are pretty-printed in 10-point Geneva font.
  7.  
  8. #define SystemSevenOrLater    TRUE
  9.  
  10. #include <Types.r>
  11. //#include <SysTypes.r>
  12. //#include <PowerPlant.r>
  13.  
  14. //    This file can be directly included and compiled by ReZ of CW11 or later.
  15. //    Due to a restriction of CW11, this private version of <Errors.h> file is still needed.
  16. //    The file includes some BAD numbers as enum value and "extern" statements, so that
  17. //    the ReZ compiler can not pass them.
  18. //    This private version of <Errors.h> is just copied from the original file, but
  19. //    one extern statement "SysError()" and enum values "badComponent*" are deleted.
  20. //    #include <Errors.h>
  21.  
  22. #include "Errors.r"
  23.  
  24.  
  25. // --------------------------------------------------
  26. //    • Pascal-Style Error Message String Resources
  27. // --------------------------------------------------
  28. #define        kErrorMessage_ResType        'ErrM'
  29. #define        kErrorMessagex_ResType        'Err#'
  30.  
  31. //*---- ErrM  • Pascal-Style String -----*/
  32. type kErrorMessage_ResType {
  33.     pstring;            /* String */
  34. };
  35.  
  36. //*---- Err# • Pascal-Style String List -----*/
  37. type kErrorMessagex_ResType {
  38.     integer = $$Countof(StringArray);
  39.     array StringArray {
  40.             pstring;    /* String */
  41.     };
  42. };
  43.  
  44. // --------------------------------------------------
  45. //    • File System
  46. // --------------------------------------------------
  47. #define    kErrorMessage_FileSystem        "File"
  48. #define    kErrorMessage_AppleGuide        "Apple Guide"
  49.  
  50. resource kErrorMessage_ResType (
  51.     ioErr, kErrorMessage_FileSystem, purgeable)
  52.     { "I/O error" };
  53.  
  54. resource kErrorMessage_ResType (
  55.     bdNamErr, kErrorMessage_FileSystem, purgeable)
  56.     { "Bad filename" };
  57.  
  58. resource kErrorMessage_ResType (
  59.     fnfErr, kErrorMessage_FileSystem, purgeable)
  60.     { "File not found" };
  61.  
  62. resource kErrorMessage_ResType (
  63.     dirNFErr, kErrorMessage_FileSystem, purgeable)
  64.     { "Directory not found" };
  65.  
  66. resource kErrorMessage_ResType (
  67.     opWrErr, kErrorMessage_FileSystem, purgeable)
  68.     { "File already open for writing" };
  69.  
  70. resource kErrorMessage_ResType (
  71.     permErr, kErrorMessage_FileSystem, purgeable)
  72.     { "Attempt to open locked file for writing" };
  73.  
  74. resource kErrorMessage_ResType (
  75.     wrPermErr, kErrorMessage_FileSystem, purgeable)
  76.     { "Write permittions does not allow writing" };
  77.  
  78. resource kErrorMessage_ResType (
  79.     fLckdErr, kErrorMessage_FileSystem, purgeable)
  80.     { "File is locked" };
  81.  
  82. resource kErrorMessage_ResType (
  83.     vLckdErr, kErrorMessage_FileSystem, purgeable)
  84.     { "Volume is locked or read-only" };
  85.  
  86. resource kErrorMessage_ResType (
  87.     wPrErr, kErrorMessage_FileSystem, purgeable)
  88.     { "Diskette is write-protected" };
  89.  
  90. resource kErrorMessage_ResType (
  91.     kAGErrAppleGuideNotAvailable, kErrorMessage_AppleGuide, purgeable)
  92.     { "Can't open guide file. Please install Apple Guide extension file in your system." };
  93.  
  94. resource kErrorMessage_ResType (
  95.     kAGErrDatabaseOpen, kErrorMessage_AppleGuide, purgeable)
  96.     { "Apple Guide file is already open" };
  97.  
  98. resource kErrorMessage_ResType (
  99.     kAGErrDatabaseNotAvailable, kErrorMessage_AppleGuide, purgeable)
  100.     { "Apple Guide file was not found. Please locate guide file at the same folder of application." };
  101.  
  102.  
  103. // --------------------------------------------------
  104. //    • Error Box
  105. // --------------------------------------------------
  106. #define ALRT_ErrorBox            9000
  107. #define ALRT_ErrorBoxTitle        "Error Box"
  108.  
  109. resource 'DITL' (ALRT_ErrorBox, ALRT_ErrorBoxTitle, purgeable) {
  110.     {
  111.         {152, 143, 172, 201},
  112.         Button { enabled, "OK" },
  113.  
  114.         {1152, 264, 1172, 322},
  115.         Button { enabled, "Cancel" },
  116.  
  117. //        {12, 20, 44, 52},
  118. //        Icon { disabled, 1 },
  119.  
  120.         {12, 72, 44, 272},
  121.         StaticText { disabled, "Error Diagnosis" },
  122.  
  123.         {52, 72, 148, 328},
  124.         StaticText { disabled,
  125.             "Category: ^0\n"
  126.             "Code: ^1\n"
  127.             "Status: ^2\n"
  128.             "^3"
  129.         }
  130.     }
  131. };
  132.  
  133.  
  134. resource 'ALRT' (ALRT_ErrorBox, ALRT_ErrorBoxTitle, purgeable) {
  135.     {51, 95, 231, 439},
  136.     ALRT_ErrorBox,
  137.     {
  138.         OK, visible, silent,
  139.         OK, visible, silent,
  140.         OK, visible, silent,
  141.         OK, visible, silent
  142.     },
  143.     alertPositionMainScreen
  144. };
  145.  
  146. // end of resources
  147.